<!--
 * @Author: 小花
 * @Date: 2022-03-06 11:11:07
 * @LastEditors: 小花
 * @LastEditTime: 2022-04-18 16:27:01
 * @Description: 
-->
<template>
  <div class='workerHome_container'>
    <el-container>
      <el-header direction="horizontal">
        <elMenu :el_menu_item="el_menu_item"></elMenu>
      </el-header>
      <el-main>
        <router-view v-slot="{ Component }">
          <keep-alive exclude="record_details">
            <component :is="Component" />
          </keep-alive>
        </router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script>
import elMenu from '@/public/el-menu/el-menu.vue'

export default {
  //import引入的组件需要注入到对象中才能使用
  components: {
    elMenu
  },
  data () {
    //这里存放数据
    return {
      el_menu_item: [
        { name: '报修中心', index: '/workerHome/worker_repairCenter' },
        { name: '报修记录', index: '/workerHome/worker_repairRecord' },
      ],
    }
  }
}
</script>